home *** CD-ROM | disk | FTP | other *** search
- > I have one other small problem (more an annoyance, really) in that
- > I use Input #1 at the start of the game to load in the
- > level data which takes the form of several arrays of dimensions
- > (40,40) or so, and it takes absolutely *ages*. Is there
- > any quicker way of loading variables from disk? I have tried
- > moving the files to ram: first but this makes no substantial
- > speed difference from the hard drive. I dread to think
- > what it would be like off floppies.
-
- Oh yeah, there are MUCH better ways. There's a whole lot of translation
- involved in the way you're doing it. To store the values, poke them into a
- memory bank and BSave the bank's memory. To retrieve it, Bload the file
- into a bank. If you want to put the values back into variables, just use
- peek, deek or leek (depending on the size of your numbers) and put the values
- back into variables. This storage reduces size and translation steps. You
- could also use random access files which would probably be better yet. If
- you have an array of integers, you can load and save REALLY fast by saving
- the block of memory directly to disk from the array (with BSAVE) and loading
- from disk into the arrays memory (with BLOAD). I'm in quite a hurry now so
- if you need more explanation just let me know.
- -- Ben
-
-